package main

import (
	"flag"
	"fmt"
	. "gomysql"
)

func main() {
	PreTable := flag.String("preTable", "article", "from table")
	PreField := flag.String("preField", "title", "from field")
	flag.Parse()
	list, err := M("db0").Select(*PreField).From(*PreTable).Limit(5).GetAll()
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(list)
	}
}
